package cn.hk.user.mapper;

import cn.hk.user.domain.UserInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import org.apache.ibatis.annotations.Param;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 * app用户表 Mapper 接口
 * </p>
 *
 * @author xu
 * @since 2023-03-07
 */
@DataSource(DataSourceType.KELIN)
public interface UserInfoMapper extends BaseMapper<UserInfo> {

    UserInfo selectUserByPhone(@Param("phone") String phone);

    boolean insertUser( UserInfo userInfo);

    boolean updateUserById(UserInfo userInfo);

    UserInfo selectOneById(@Param("userId") Long userId);

    UserInfo selectUserByPhoneAndName(@Param("phone")String phone,@Param("userName") String userName);

    UserInfo selectByBirthCertificate(@Param("birthCertificate")String birthCertificate);

    UserInfo selectOneByIdCard(@Param("idCard")String idCard);
}
